﻿using System.ComponentModel;

namespace HeroldIT.Dnn.Modules.News.Views
{
    public abstract class ViewBase<TPortalModuleBase> : PortalModuleView<TPortalModuleBase>
        where TPortalModuleBase : ContainerBase
    {
        #region properties

        /// <summary>
        /// Gets the module's controller instance.
        /// </summary>
        internal NewsController Controller
        {
            get { return this.ModuleBase.Controller; }
        }

        protected bool HasCoreModule
        {
            get
            {
                return this.Controller.HasCoreModule();
            }
        }

        private bool autoBind = true;

        [Browsable(true)]
        [DefaultValue(true)]
        [Localizable(false)]
        [Category("Behavior")]
        public bool AutoBind
        {
            get { return this.autoBind; }
            set { this.autoBind = value; }
        }

        #endregion
    }
}
